/* 基本重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 语言切换按钮样式 - 适配灰色背景 */
.top-nav .language-switch {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    padding: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* 主题切换按钮样式 */
.top-nav .theme-switch {
    margin-left: 15px;
}

.top-nav .theme-toggle {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.top-nav .theme-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.1);
}

.top-nav .theme-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.top-nav .theme-toggle:hover .theme-icon {
    transform: rotate(180deg);
}

/* 语言切换按钮样式 - 适度透明度 */
.top-nav .lang-switch {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    padding: 6px 12px;
    border-radius: 16px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* 语言按钮悬停效果 - 适度透明度 */
.top-nav .lang-switch:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
}

/* 激活状态样式 - 适度透明度 */
.top-nav .lang-switch.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.25);
}
/* 添加装饰性背景图案 - 更微妙的装饰 */
.top-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 90% 10%, rgba(255, 255, 255, 0.05) 0%, transparent 30%);
    pointer-events: none;
}

/* 导航链接悬停效果 - 适配灰色背景 */
.top-nav .nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.25);
}

html {
    scroll-behavior: smooth;
}

/* 主体样式 - 移除侧边栏边距 */
body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* 深色主题样式 */
body.dark-theme {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

/* 深色主题下的导航栏调整 */
body.dark-theme .top-nav {
    background: rgba(30, 30, 30, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .top-nav .logo {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.dark-theme .top-nav .nav-links a {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.9);
}

body.dark-theme .top-nav .nav-links a:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark-theme .top-nav .language-switch {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

body.dark-theme .top-nav .theme-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* 容器样式 */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 顶部导航栏样式 - 灰色背景，适度透明 */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: rgba(60, 60, 60, 0.85);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 导航内容样式 - 水平布局 */
.top-nav .nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    padding: 0 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo样式优化 - 适配灰色背景 */
.top-nav .logo {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.top-nav .logo:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

.sidebar-nav .logo::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    border-radius: 2px;
}

.sidebar-nav .nav-links {
    list-style: none;
    padding: 0;
    flex-grow: 1;
}

.sidebar-nav .nav-links li {
    margin: 10px 0;
    position: relative;
}

.sidebar-nav .nav-links li::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #fff, transparent);
    transition: width 0.3s ease;
}

.sidebar-nav .nav-links li:hover::before {
    width: 15px;
}

/* 导航链接样式 - 更简洁透明 */
.top-nav .nav-links {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

.top-nav .nav-links li {
    margin: 0;
    position: relative;
}

.top-nav .nav-links a {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9rem;
    font-weight: 500;
}

.sidebar-nav .nav-links a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.sidebar-nav .nav-links a:hover::before {
    left: 100%;
}

.sidebar-nav .nav-links a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(10px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
}

/* 英雄区域样式 - 适配更小的顶部导航栏 */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1517180102446-f3ece451e9d8?w=1920&h=1080&fit=crop') center/cover no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding-top: 60px; /* 为更小的顶部导航栏留出空间 */
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: #4CAF50;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: #45a049;
}

/* 关于我样式 */
.about {
    padding: 100px 0;
    background-color: #fff;
    transition: background-color 0.3s ease;
}

body.dark-theme .about {
    background-color: #2d2d2d;
}

body.dark-theme .about h2,
body.dark-theme .about h3,
body.dark-theme .about h4,
body.dark-theme .about h5 {
    color: #e0e0e0;
}

body.dark-theme .about p {
    color: #b0b0b0;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

.about-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    margin-right: 30px;
}

.about-image img {
    width: 100%;
    height: 300px;
    border-radius: 50%;
    border: 5px solid #f0f0f0;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.about-image img:hover {
    transform: scale(1.05);
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-text h3 {
    font-size: 1.8rem;
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 600;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    line-height: 1.8;
    color: #555;
}

/* 技能标签样式 */
.skills-section {
    margin-top: 30px;
}

.skills-section h4 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 15px;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.skill-tag.expert {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.skill-tag.proficient {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
}

.skill-tag.beginner {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(79, 172, 254, 0.3);
}

.skill-tag:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* 时间线样式 */
.timeline-section {
    margin-top: 60px;
}

.timeline-section h4 {
    text-align: center;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 40px;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #667eea, #764ba2);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-date {
    flex: 1;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    color: #667eea;
    padding: 0 20px;
}

.timeline-content {
    flex: 2;
    background: #fff;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.timeline-content h5 {
    font-size: 1.3rem;
    color: #333;
    margin-bottom: 8px;
}

.timeline-content p {
    color: #666;
    margin: 0;
    font-size: 1rem;
}

/* 成就部分样式 */
.achievements-section {
    margin-top: 60px;
}

.achievements-section h4 {
    text-align: center;
    font-size: 1.8rem;
    color: #333;
    margin-bottom: 40px;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.achievement-item {
    text-align: center;
    padding: 30px 20px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.achievement-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    border-color: #667eea;
}

.achievement-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

.achievement-item h5 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
}

.achievement-item p {
    color: #666;
    font-size: 0.95rem;
    margin: 0;
}

/* 作品展示 */
.works {
    padding: 100px 0;
    background-color: #f9f9f9;
    transition: background-color 0.3s ease;
}

body.dark-theme .works {
    background-color: #252525;
}

body.dark-theme .works h2,
body.dark-theme .works h3,
body.dark-theme .work-info p {
    color: #e0e0e0;
}

.works h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: #333;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.work-item {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.work-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.work-info {
    padding: 20px;
}

.work-info h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #333;
}

.work-info p {
    color: #666;
    font-size: 1rem;
}

/* 联系方式样式 */
.contact {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
    overflow: hidden;
    transition: background-color 0.3s ease;
}

body.dark-theme .contact {
    background-color: #2d2d2d;
}

body.dark-theme .contact h2,
body.dark-theme .contact h4,
body.dark-theme .contact p {
    color: #e0e0e0;
}

body.dark-theme .form-group label {
    color: #e0e0e0;
}

body.dark-theme .form-group input,
body.dark-theme .form-group textarea {
    background-color: #3d3d3d;
    color: #e0e0e0;
    border-color: #555;
}

.contact::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.contact h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: #333;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.contact h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    border-radius: 2px;
}

#contact-form {
    max-width: 500px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: #667eea;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 12px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
    font-family: inherit;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.5;
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 联系信息样式 */
.contact-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.info-text h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.info-text p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .contact-info {
        order: -1;
    }
    
    #contact-form {
        padding: 30px;
    }
}
.contact .btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 30px;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.contact .btn svg {
    transition: transform 0.3s ease;
}

.contact .btn:hover svg {
    transform: translateX(5px);
}

.contact .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.contact .btn:hover::before {
    left: 100%;
}

.contact .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.contact .btn:active {
    transform: translateY(0);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

/* 页脚样式 */
footer {
    background-color: #333;
    color: #fff;
    padding: 30px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.social-links {
    margin-top: 20px;
}

.social-links a {
    color: #fff;
    text-decoration: none;
    margin: 0 10px;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #4CAF50;
}

/* 响应式设计 - 针对更小巧顶部导航栏的优化 */
@media (max-width: 768px) {
    /* 移动端顶部导航栏调整 */
    .top-nav {
        height: 50px;
    }
    
    .top-nav .nav-content {
        padding: 0 15px;
    }
    
    .top-nav .logo {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .top-nav .nav-links {
        display: none; /* 移动端隐藏导航链接 */
    }
    
    .hero {
        padding-top: 50px; /* 适配更小的移动端导航栏高度 */
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.2rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .about-image {
        margin-right: 0;
        margin-bottom: 30px;
    }
    
    /* 关于模块响应式 */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: column !important;
        align-items: flex-start;
        padding-left: 60px;
    }
    
    .timeline-date {
        text-align: left;
        padding: 0;
        margin-bottom: 10px;
    }
    
    .timeline-content {
        width: 100%;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .skills-tags {
        justify-content: center;
    }
    
    /* 语言切换按钮响应式调整 */
    .top-nav .language-switch {
        gap: 4px;
        padding: 4px;
        border-radius: 16px;
    }
    
    .top-nav .lang-switch {
        padding: 4px 8px;
        font-size: 11px;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .about h2,
    .works h2,
    .contact h2 {
        font-size: 2rem;
    }
}